//
//  UIButton+Extensions.swift
//  weibo
//
//  Created by shizb macbook air on 17/8/3.
//  Copyright © 2017年 YL. All rights reserved.
//

import UIKit
extension UIButton{
    convenience init(title:String,fontSize:CGFloat,normalColor:UIColor,highlightColor:UIColor,backgroundImageName:String) {
        self.init()
        setTitle(title, for: .normal)
        titleLabel?.font=UIFont.systemFont(ofSize: fontSize)
        setTitleColor(UIColor.red, for: .normal)
        setTitleColor(UIColor.orange, for: .highlighted)
        setBackgroundImage(UIImage(named: backgroundImageName), for: UIControlState.normal)

        sizeToFit()
        
        
    }
}






























